Write a custom CUDA kernel to optimize `BLU` (Bendable Linear Unit).

Formula: f(x) = beta * (sqrt(x^2 + 1) - 1) + x

Problem Analysis:
1. Memory Bound: This is an element-wise activation with moderate arithmetic intensity (sqrt, fma).
2. Operator Chaining: A PyTorch implementation creates intermediate tensors for pow, sqrt, etc.

Optimization Strategy: Fused Element-wise Kernel with Vectorization

1. One-Thread-per-Element: Map each element to a CUDA thread.

2. Vectorized Loads (float4): Use `float4` to process 128 bits per memory transaction.

3. Fused Fast Math:
   - For each element `x`:
     `sqrt_val = sqrtf(x * x + 1.0f)`
     `result = beta * (sqrt_val - 1.0f) + x`
   - All computations are fused in registers.

4. One-Pass: Fuse all steps into a single read-compute-write kernel.
  
Here's an example to show you the syntax of inline embedding custom CUDA operators in torch: The example given architecture is:   
  
```python
import torch
import torch.nn as nn

BATCH_SIZE = 4096
HIDDEN_DIM = 4096
SHAPE = (BATCH_SIZE, HIDDEN_DIM)

BETA_VAL = 0.5

class BLU(nn.Module):
    '''
    Bendable Linear Units
    L. B. Godfrey, “An evaluation of parametric activation functions for deep learning,” in Proc. IEEE Int. Conf. Syst., Man Cybern. (SMC), Oct. 2019, pp. 3006–3011.
    
    Formula: f(x) = beta * (sqrt(x^2 + 1) - 1) + x
    '''
    def __init__(self, beta=0.5):
        super(BLU, self).__init__()
        self.beta = beta

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        return self.beta * (torch.sqrt(x.pow(2) + 1.0) - 1.0) + x

class Model(nn.Module):
    def __init__(self, beta=0.5):
        super(Model, self).__init__()
        self.act = BLU(beta=beta)
    
    def forward(self, x):
        return self.act(x)

def get_inputs():
    input_tensor = torch.randn(SHAPE, dtype=torch.float32) * 5.0
    return [input_tensor.contiguous()]

def get_init_inputs():
    return [BETA_VAL]